package google_translate_api_demo;

import cn.pixelsol.google.translate.GoogleTransApi;
import cn.pixelsol.google.translate.GoogleTransApi.FromLang;
import cn.pixelsol.google.translate.GoogleTransApi.ToLang;

public class GoogleTransApiDemo {

	public static void main(String[] args) {
		GoogleTransApi googleApi = new GoogleTransApi();
		String source = "This is a fantastic translation tool. I love it.";

		String result1 = googleApi.translate(source, "auto", "zh-CN");
		System.out.println(result1);
		String result2 = googleApi.translate(source, FromLang.自动检测, ToLang.中文_简体);
		System.out.println(result2);

	}

}
